import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Login',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/login/Login.vue')
  },
  {
    path: '/menu',
    name: 'Menu',
    component: () => import( '../views/menu/Menu.vue'),
    meta:{
      requireAuth:true

    }
  },
  {
    path: '/system',
    name: 'System',
    component: () => import( '../views/system/System.vue'),
    meta:{
      requireAuth:true
    },
    children:[
      {
        path:'stereoscopicLibrary',
        component:()=> import('../views/system/list/stereoscopicLibrary/StereoscopicLibrary.vue'),
        meta:{
          requireAuth:true
        },
      },
      {
        path:'deliveryTrolley',
        component:()=> import('../views/system/list/deliveryTrolley/DeliveryTrolley.vue'),
        meta:{
          requireAuth:true
        },
      },
      {
        path:'toolKit',
        component:()=> import('../views/system/list/toolKit/ToolKit.vue'),
        meta:{
          requireAuth:true
        },
      },
      {
        path:'toolMaterial',
        component:()=> import('../views/system/list/toolMaterial/ToolMaterial.vue'),
        meta:{
          requireAuth:true
        },
      },
      {
        path:'bufferBin',
        component:()=> import('../views/system/list/bufferBin/BufferBin.vue'),
        meta:{
          requireAuth:true
        },
      },
      {
        path:'largeGoodsShelves',
        component:()=> import('../views/system/list/largeGoodsShelves/LargeGoodsShelves.vue'),
        meta:{
          requireAuth:true
        },
      },
      {
        path:'largeGoodsMaterial',
        component:()=> import('../views/system/list/largeGoodsMaterial/LargeGoodsMaterial.vue'),
        meta:{
          requireAuth:true
        },
      },
      {
        path:'wcsInterface',
        component:()=> import('../views/system/list/wcsInterface/index.vue'),
        meta:{
          requireAuth:true
        },
      },
      {
        path:'logSearch',
        component:()=> import('../views/system/list/logSearch/index.vue'),
        meta:{
          requireAuth:true
        },
      },
      {
        path:'sortingTable',
        component:()=> import('../views/system/list/sortingTable/SortingTable.vue'),
        meta:{
          requireAuth:true
        },
      },
      {
        path:'binMaterial',
        component:()=> import('../views/system/list/binMaterial/BinMaterial.vue'),
        meta:{
          requireAuth:true
        },
      },
      {
        path:'deliveryPerson',
        component:()=> import('../views/system/list/deliveryPerson/DeliveryPerson.vue'),
        meta:{
          requireAuth:true
        },
      }
    ]
  },
  {
    path: '/materialReceipt',
    name: 'MaterialReceipt',
    component: () => import( '../views/materialReceipt/MaterialReceipt.vue'),
    meta:{
      requireAuth:true
    },
    children:[
      {
        path:'scanningHandover',
        name:'ScanningHandover',
        component:()=> import('../views/materialReceipt/list/scanningHandover/ScanningHandover.vue'),
        meta:{
          requireAuth:true
        },
      },
      {
        path:'coordinateManagement',
        component:()=> import('../views/materialReceipt/list/coordinateManagement/CoordinateManagement.vue'),
        meta:{
          requireAuth:true
        },
      },
      {
        path:'scanningReturn',
        component:()=> import('../views/materialReceipt/list/scanningReturn/ScanningReturn.vue'),
        meta:{
          requireAuth:true
        },
      },
      {
        path:'partReceive',
        component:()=> import('../views/materialReceipt/list/partReceive/PartReceive.vue'),
        meta:{
          requireAuth:true
        },
      },
      {
        path:'finishedReceive',
        component:()=> import('../views/materialReceipt/list/finishedReceive/FinishedReceive.vue'),
        meta:{
          requireAuth:true
        },
      },
      {
        path:'returnReceive',
        component:()=> import('../views/materialReceipt/list/returnReceive/ReturnReceive.vue'),
        meta:{
          requireAuth:true
        },
      },
      {
        path:'standardReceive',
        component:()=> import('../views/materialReceipt/list/standardReceive/StandardReceive.vue'),
        meta:{
          requireAuth:true
        },
      },
      {
        path:'materialWarehousing',
        component:()=> import('../views/materialReceipt/list/materialWarehousing/MaterialWarehousing.vue'),
        meta:{
          requireAuth:true
        },
      },
      {
        path:'partReturn',
        component:()=> import('../views/materialReceipt/list/partReturn/PartReturn.vue'),
        meta:{
          requireAuth:true
        },
      },
      {
        path:'finishReturn',
        component:()=> import('../views/materialReceipt/list/finishReturn/FinishReturn.vue'),
        meta:{
          requireAuth:true
        },
      },
      {
        path:'standardReturn',
        component:()=> import('../views/materialReceipt/list/standardReturn/StandardReturn.vue'),
        meta:{
          requireAuth:true
        },
      }
    ]
  },
  {
    path: '/sortingMatching',
    name: 'SortingMatching',
    component: () => import( '../views/sortingMatching/SortingMatching.vue'),
    meta:{
      requireAuth:true
    },
    children:[{
      path:'supportingTask',
      component:()=> import('../views/sortingMatching/list/supportingTask/SupportingTask.vue'),
      meta:{
        requireAuth:true
      },
    },
    {
      path:'sortingPreMatching',
      component:()=> import('../views/sortingMatching/list/sortingPreMatching/SortingPreMatching.vue'),
      meta:{
        requireAuth:true
      },
    },
    {
      path:'sortingManagement',
      component:()=> import('../views/sortingMatching/list/sortingManagement/SortingManagement.vue'),
      meta:{
        requireAuth:true
      },
    },
    {
      path:'sortManagementDo',
      component:()=> import('../views/sortingMatching/list/sortManagementDo/SortManagementdo.vue'),
      meta:{
        requireAuth:true
      },
    },
    {
      path:'changeSort',
      component:()=> import('../views/sortingMatching/list/changeSort/ChangeSort.vue'),
      meta:{
        requireAuth:true
      },
    },
    {
      path:'workpackageUnpack',
      component:()=> import('../views/sortingMatching/list/workpackageUnpack/WorkpackageUnpack.vue'),
      meta:{
        requireAuth:true
      },
    },
    {
      path:'workpackageCancellation',
      component:()=> import('../views/sortingMatching/list/workpackageCancellation/WorkpackageCancellation.vue'),
      meta:{
        requireAuth:true
      },
    },
    {
      path:'workpackageReplacement',
      component:()=> import('../views/sortingMatching/list/workpackageReplacement/WorkpackageReplacement.vue'),
      meta:{
        requireAuth:true
      },
    },
    {
      path:'receiveSorting',
      component:()=> import('../views/sortingMatching/list/receiveSorting/ReceiveSorting.vue'),
      meta:{
        requireAuth:true
      },
    }]
  },
  {
    path: '/materialDistribution',
    name: 'MaterialDistribution',
    component: () => import( '../views/materialDistribution/MaterialDistribution.vue'),
    meta:{
      requireAuth:true
    },
  },
    {
      path: '/MainMaterialDistribution',
      name: 'MainMaterialDistribution',
      component: () => import( '../views/materialDistribution/MainMaterialDistribution.vue'),
      meta:{
        requireAuth:true
      },
    },
    // children:[{
    //   path:'deliveryTask',
    //   component:()=> import('../views/materialDistribution/list/deliveryTask/DeliveryTask.vue'),
    //   meta:{
    //     requireAuth:true
    //   },
    // },{
    //   path:'deliveryScanHandover',
    //   component:()=> import('../views/materialDistribution/list/deliveryScanHandover/DeliveryScanHandover.vue'),
    //   meta:{
    //     requireAuth:true
    //   },
    // },{
    //   path:'receiveDirectDistribution',
    //   component:()=> import('../views/materialDistribution/list/receiveDirectDistribution/ReceiveDirectDistribution.vue'),
    //   meta:{
    //     requireAuth:true
    //   },
    // }]

  {
    path:'/materialDistribution/deliveryTask',
    component:()=> import('../views/materialDistribution/list/deliveryTask/DeliveryTask.vue'),
    meta:{
      requireAuth:true
    },
  },{
    path:'/materialDistribution/deliveryScanHandover',
    component:()=> import('../views/materialDistribution/list/deliveryScanHandover/DeliveryScanHandover.vue'),
    meta:{
      requireAuth:true
    },
  },{
    path:'/materialDistribution/receiveDirectDistribution',
    component:()=> import('../views/materialDistribution/list/receiveDirectDistribution/ReceiveDirectDistribution.vue'),
    meta:{
      requireAuth:true
    },
  },
  {
    path: '/inventoryManagement',
    name: 'InventoryManagement',
    component: () => import( '../views/inventoryManagement/InventoryManagement.vue'),
    meta:{
      requireAuth:true
    },
    children:[{
      path:'flowQuery',
      component:()=> import('../views/inventoryManagement/list/flowQuery/FlowQuery.vue'),
      meta:{
        requireAuth:true
      },
    },{
      path:'inventoryQuery',
      component:()=> import('../views/inventoryManagement/list/inventoryQuery/InventoryQuery.vue'),
      meta:{
        requireAuth:true
      },
    },{
      path:'stockReturnQuery',
      component:()=> import('../views/inventoryManagement/list/stockReturnQuery/StockReturnQuery.vue'),
      meta:{
        requireAuth:true
      },
    },{
      path:'handoverQuery',
      component:()=> import('../views/inventoryManagement/list/handoverQuery/HandoverQuery.vue'),
      meta:{
        requireAuth:true
      },
    },{
      path:'trayInfo',
      component:()=> import('../views/inventoryManagement/list/trayInfo/TrayInfo.vue'),
      meta:{
        requireAuth:true
      },
    }]
  },
  {
    path: '/operationMonitoring',
    name: 'OperationMonitoring',
    component: () => import( '../views/operationMonitoring/OperationMonitoring.vue'),
    meta:{
      requireAuth:true
    },
  },
  {
    path: '*',
    name: 'NotFound',
    component: () => import( '../views/notFound/NotFound.vue'),
    meta:{
      requireAuth:true
    }
  }
]



const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})




export default router
